<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>map</title>
    <style type="text/css">
        html {
            height: 100%
        }

        body {
            height: 100%;
            margin: 0px;
            padding: 0px
        }

        #container {
            height: 100%
        }
    </style>
    <script type="text/javascript"
        src="https://api.map.baidu.com/api?v=1.0&type=webgl&ak=Ax9mf7Od0WhvVlrYFGZkwwhvA5pO5gmG">
    </script>
    <style type="text/css">
        body,
        html,
        #container {
            width: 100%;
            height: 100%;
            overflow: hidden;
            margin: 0;
            font-family: "微软雅黑";
        }
    </style>
</head>

<body>
    <div id="container"></div>
    <script type="text/javascript">
        var map = new BMapGL.Map("container");
        map.centerAndZoom(new BMapGL.Point(116.404, 39.915), 14);
        var riding = new BMapGL.RidingRoute(map, {
            renderOptions: {
                map: map,
                autoViewport: true
            }
        });
        var start = new BMapGL.Point(116.310791, 40.003419);
        var end = new BMapGL.Point(116.386419, 40.003519);
        riding.search(start, end);
    </script>
</body>

</html>